{
    const NAME = 'components.banner'

    module.exports = require('angular').module(NAME, [])
        .directive(NAME, function () {
            return {
                replace: true,
                template: function (attr) {
                    require('.' + attr.attr('banner-css'))
                    return require('.' + attr.attr('banner-tpl'))
                },
                link: function (scope, ele, attr) {
                    console.log(attr)
                }
            }
        })
        .directive('components.banner.scroller', function () {
            return {
                link: function (scope, ele, attr) {
                    ele.css('width', ele.parent()[0].offsetWidth * 3 + 'px')
                }
            }
        })
}